package org.streets.eis.ext.analysis.components;

import java.io.Serializable;
import org.streets.database.datadict.ColumnDefinition;
import org.streets.database.datadict.TableDefinition;

public class ColumnWrapper implements Serializable {
	private static final long serialVersionUID = 1L;
	private TableDefinition table;
	private String name;
	private String alias;
	private String type;
	private String attr; //确定是否代码值,[选择值]是否外键值,[弹出窗口选择,如何确定弹出哪一个？]
	private String folder;
	private String memo;
	private boolean encrypt;
	private int index;

	private Boolean display;
	private Boolean ifclause;
	private Boolean order;
	
	public ColumnWrapper(ColumnDefinition col){
		this.table = col.getTable();
		this.name = col.getName();
		this.alias = col.getAlias();
		
		this.type = col.getType().getSimpleName();//.toString();
		//System.out.println("字段数据类型:"+this.type);		
		this.attr = col.getAttr();
		this.folder = col.getFolder();
		this.memo = col.getMemo();
		//this.index = col.getIndex();
		this.display = false;
		this.ifclause = false;
		this.order = false;
	}
	
	public void setTable(TableDefinition table) {
		this.table = table;
	}
	public TableDefinition getTable() {
		return table;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setAlias(String alias) {
		this.alias = alias;
	}
	public String getAlias() {
		return alias;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getType() {
		return type;
	}
	public void setAttr(String attr) {
		this.attr = attr;
	}
	public String getAttr() {
		return attr;
	}
	public void setFolder(String folder) {
		this.folder = folder;
	}
	public String getFolder() {
		return folder;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public String getMemo() {
		return memo;
	}
	public void setEncrypt(boolean encrypt) {
		this.encrypt = encrypt;
	}
	public boolean isEncrypt() {
		return encrypt;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public int getIndex() {
		return index;
	}
	public void setDisplay(Boolean display) {
		this.display = display;
	}
	public Boolean getDisplay() {
		return display;
	}
	public void setIfclause(Boolean ifclause) {
		this.ifclause = ifclause;
	}
	public Boolean getIfclause() {
		return ifclause;
	}
	public void setOrder(Boolean order) {
		this.order = order;
	}
	public Boolean getOrder() {
		return order;
	}

}
